Conversation
template_chunked.html
- Line 97-101: Replaced the non-functional <form> search with a styled button that opens a Bootstrap modal, showing a Ctrl K keyboard hint
- Lines 134-152: Added a Bootstrap modal with search input, results list, empty state, and hint text
- Lines 226-227: Added Fuse.js v7.1.0 via CDN (defer)
- Lines 291-413: Added the search engine JavaScript:
- Fetches search-index.json and builds a Fuse index on page load
- Ctrl+K / Cmd+K and / keyboard shortcuts to open
- 150ms debounced fuzzy search, top 20 results
- Match highlighting using <mark> tags
- Arrow key navigation + Enter to select
- Modal clears state on close
style.css (new section before scrollable navbar)
- Search trigger button styling with kbd shortcut hint
- Modal body max-height for scrollability
- Search result items with active border highlight
- Match <mark> styling with warning-colored background
…h requires serving from a server like python http or npx serve)
Replaces deprecated `\rm` with `\mathrm` in mathematical expressions across the documentation. pandoc to html didn't like \rm
Replace verbose `\raisebox` and `\mathord` constructs for fractions with the standard `\frac` command. This improves the readability and semantic correctness of the LaTeX source, facilitating better maintainability and consistent rendering across documentation tools.
Replace verbose `\mathord` constructs for fractions with the standard `\frac` command. This improves the readability and semantic correctness of the LaTeX source, facilitating better maintainability and consistent rendering across documentation tools, especially for HTML conversion.
Replace non-standard math symbol commands (`\rlap{--}`, `\smallint`) with standard LaTeX (`\overline`, `\int`), use `\textrm` for upright text within math mode instead of `\textup` or `\textnormal`, and remove extraneous manual spacing (`\kern 1pt`, `\;`). This improves semantic correctness, readability, and consistent rendering across documentation tools, particularly for HTML conversion.
All 4 PDFs (engineering-reference, input-output-reference, external-interfaces-application-guide, output-details-and-examples) compiled with zero errors.
## Session summary
Starting from the `html_docs` CMake wiring, this turned into a full sweep of every pandoc math-rendering warning across the doc set. Final state: **0 warnings**, all touched PDFs verified to still compile cleanly in `xelatex`.
Fixes applied, roughly in the order tackled:
- `\rm{...}` / `{\rm X}` / `\bf{...}` (legacy plain-TeX font switches) → `\mathrm{}`/`\mathbf{}`/`\textrm{}`/`\textbf{}` depending on math vs. text context — caught and corrected a regression where blind `\mathrm` substitution broke 4 text-mode usages (`\mathrm` only works in math mode).
- `{\mathop{\rm X}\nolimits}` → `\operatorname{X}` (20 files).
- `\medmuskip`/`\thinmuskip`/etc. register hacks inside `\begin{equation}` → moved outside into an enclosing `{...}` group (14 occurrences, 6 files).
- Diagonal-fraction Word artifacts (`\raise...\hbox{}...\vphantom{}...\lower...\hbox{}` and the bare `\mathord{\left/{\vphantom{}}\right.}` variant) → `\frac{}{}`, including nested cases handled via iterative passes (93 occurrences total); one doubly-nested fraction-of-fractions in `generators.tex` hand-rewritten.
- `\textnormal`/`\textup`/`\textsubscript`/`\smallint` → `\textrm{}`/`_{\text{}}`/`\int` (mode-checked, one text-mode `\textsubscript` correctly left alone).
- `{\kern Npt}` spacing hacks → removed (60 occurrences, 8 files).
- `\rlap{--} \dot V` (ASME volumetric-flow notation) → `\overline{\dot V}` (16 occurrences, 2 files).
- `\emph{}` inside math → `\textit{}`, scoped only to math contexts via a context-tracking scanner (137 occurrences, 3 files) — left thousands of legitimate prose `\emph` untouched.
- Stray `\\` artifacts left inside subscripts/superscripts from Word conversion → removed (28+ occurrences across ~12 files), carefully excluding legitimate `\substack{...\\...}` line breaks.
- `\genfrac{}{}{0pt}{2}{A}{B}` → `\substack{A\\B}` (3 occurrences).
- A genuinely obscure pandoc parser quirk: any equation ending in a single bare token immediately before `\label{}` fails to parse — fixed by wrapping that trailing token in `{}` (12 equations, isolated via bisection since it wasn't documented anywhere).
- A `\footnote{}` embedded inside a math `array` environment (invalid placement) — relocated the footnote to the explanatory prose sentence preceding the equation.
The CMake/HTML-build wiring itself (from earlier in the session) is unaffected by any of this — `BUILD_HTML_DOCS=ON` still produces `html/index.html` + one subdirectory per doc, each with its own chunked pages, search index, and styling, matching the PDF pipeline's structure.
…lename https://github.com/jmarrec/EnergyPlus/actions/runs/27832002956/job/82370826883 Run actions/upload-artifact@v7 With the provided path, there will be 1377 files uploaded Artifact name is valid! Root directory input is valid! Error: The path for one of the files in artifact is not valid: /input-output-reference/1.4-sec:api-usage.html. Contains the following character: Colon : Invalid characters include: Double quote ", Colon :, Less than <, Greater than >, Vertical bar |, Asterisk *, Question mark ?, Carriage return \r, Line feed \n The following characters are not allowed in files that are uploaded due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.
367a856 fixed the same, but it was pre-rebase. - **`\begin{array}{*{20}{c}}`** (Word's repeated-column macro, unsupported by pandoc's texmath parser) → replaced with a literal `\begin{array}{ccc}` (max columns needed across all occurrences was 3) in: - `doc/engineering-reference/.../window-calculation-module.tex` - `doc/engineering-reference/.../radiant-system-models.tex` - `doc/engineering-reference/.../zone-equipment-and-zone-forced-air-units.tex` - `doc/input-output-reference/.../group-location-climate-weather-file-access.tex` - **`\rm{...}`** (legacy plain-TeX font switch, same class of fix as `367a85622c`) → `\mathrm{...}` in `doc/input-output-reference/.../group-internal-gains-people-lights-other.tex` - **`\min\!\Bigl(...\Bigr)`** → pandoc's texmath doesn't support `\Bigl`/`\Bigr`; changed to `\bigl`/`\bigr` (matching the `\bigl`/`\bigr` already used elsewhere in the same file) in `doc/engineering-reference/.../ice-thermal-storage.tex` These are all new equations that came in from `develop` during the rebase — none of these files were touched by the original `367a85622c` fixup commit, so they'd never gone through that pass. A from-scratch rebuild of `output-details-and-examples`, `engineering-reference`, and `input-output-reference` now completes with 0 warnings.
…nce Makefile target to test locally the full site
|
Would it be possible to enable PDF and epub downloads from ReadTheDocs? I would like to keep an offline copy of each doc. |
|
PDFs are posted separately on each release, and that will remain the same. I'm unsure how necessary epub would be. |
|
Also, a reminder that we also update energyplus.net with the PDF docs each release, so maybe we can just make an obvious link to that: https://energyplus.net/documentation |
|
@JasonGlazer take another look. We'll be tweaking on this thing for a while, but I've fixed a few things today. Regarding AI converting our graphics to something "better" - my limited experience with that on this project is that it's likely to struggle. We probably just need a prioritized list of the worst offending figures, and then I can start working on it bit by bit with my graphics person. |
|
I was a bit more organized this morning and reviewed a bunch of the more commonly used documents. For the shorter ones, I tried to look at most pages, and for the larger ones, I looked at a sample of pages. This was far from exhaustive but I did find some more issues that could probably be addressed. GeneralNone of the documents have section numbering, but I think that is the intent. Overall, the section numbering probably doesn’t matter, but differentiating between levels is not as obvious now without it. Perhaps the various heading levels need a more distinctive difference so the user understands when they are done with a section, subsection, or sub-subsection. For lots of tables, the header row is being repeated. Here are some examples: https://energyplus.readthedocs.io/en/html_doc/guides/output-details-and-examples/2.1-output-file-list.html (Table 2.1 and 2.2) https://energyplus.readthedocs.io/en/html_doc/guides/engineering-reference/5.1-climate-calculations.html (Table 5.1) Again, the many pixelated images are annoying. Since there is no quick fix for these, the next best option would be to force them to be a little smaller so the pixelation is not so obvious since most images default to being the full page width. Each page has an advertisement at the bottom. Given that this is a DOE-sponsored project and should probably not be appearing to endorse anything, maybe it would make sense to disable ads, perhaps even paying the nominal fee each month to do so. The "Object Index" pages are new. This is really not an “object index” but just a list of subheadings. It is confusing for most of the documents except the IOref https://energyplus.readthedocs.io/en/html_doc/guides/output-details-and-examples/5-object-index.html Text that should be in the boxed source code style but isn't appears in lots of places. For example some “XML syntax” are not in source code style blocks (although it was not in PDF either). Home PageThe user guides maybe should just be:
With the following that are really out of date maybe called “Other Guides” or “Older Documentation”
I’m not as sure about “External Interfaces Application Guide,” but I think it could probably be considered out of date. Also, near the top it says: “New to EnergyPlus? Begin with the Quick Start Guide or the Getting Started guide.” But this should probably refer to the "EnergyPlus Essentials" instead of the "Getting Started Guide" since that was intended as the replacement. External Interfaces Application GuideEquations are not numbered (although they were not in PDF either): Equations look different than PDF (although probably better):
in the PDF they looked wrong:
Output Details and Exampleseplusout.bnd example not in source code style (although it was not in PDF either) This is the case for other pages also. Part of eplusout.err text in the code box is shown as comment text in light gray but should not be In general, the auto-coloring for code boxes seems a little weird in this document. Really ugly chart (but it was that way in the PDF) Plant Application GuideThis graphic is too zoomed in and difficult to understand the workflow: Same issue here: Input Output ReferenceA page like “Group – Thermal Zone Description/Geometry” is really too long to be practical. For now it is ok but perhaps a page-only table of contents at the top would help people get to the portion that they want. The same TOC that appears in the index for each page would be great. Another option is to break it up into smaller pages. Even better would be some more text at the top introducing what the group is supposed to be about and what can be found, and maybe some discussion of why a user would pick between alternative input objects and how all the input objects in the group are related to one another (if they reference each other). Occasionally, a table or graph is way too large, such as on this page under Maximum Cycling Rate. Engineering ReferenceMultiple “Simulation Models – Encyclopedic Reference” in the TOC: https://energyplus.readthedocs.io/en/html_doc/guides/engineering-reference/index.html Fortran here: Too big of a figure, Figure 3.17 Longer Term FixesI did not proofread during the review but did notice places that could be written better and especially where a topic is not really introduced well. Perhaps a technical editor should make a pass through the most important documents and, from a reader's point of view, make suggestions on specific improvements. With documentation that has been developed over the course of so many years by so many authors, it might make sense to step back and figure out how it can be organized and improved. Almost all pages in the Engineering Reference have references at the bottom, but only a small fraction of them link to the documents that they are citing. It would be some effort, but perhaps worth it, to add links. For the older documents, it would be good to scan them and make them available. |
This is one thing that I do think AI is actually pretty good at. We can ask it to review the implementation in the code, and update the docs so they are accurate and the language flows. The biggest bottleneck with this approach are the real life humans that have to review, verify, and accept the changes. Either way, we would need to take it in chunks, but it's still worthwhile to clean some of this up, IMO. |
I just updated the settings to disable paid ads, which still allows community ads. We'll look into the paid, add-free route. |
addressed here: 3326fcb
addressed here: 07136ba
They are elsewhere... I'll see what happened in this doc.
addressed here: e42b282 Home Page suggestions are addressed here: 18b5cad |
|
Approaching last call on this one. If there are any showstoppers on this, please speak up soon. |


Pull request overview
Description of the purpose of this PR
Add targets to build the latex documentation as HTML via pandoc, and hook it to readthedocs.
A version targeting this branch was added to RTD to demo the changes:
https://energyplus.readthedocs.io/en/html_doc/
(it's hidden from the version picker and search results on purpose)
Pull Request Author
Reviewer